
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">

<title>hAdmin- 主页</title> 

<meta name="keywords" content="">
<meta name="description" content="">

<!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

<link rel="shortcut icon" href="favicon.ico">
<link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css?v=4.1.0" rel="stylesheet">
<link rel="stylesheet"
	href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<script type="text/javascript" src="js/jquery-3.1.0.js"></script>
<script src="http://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="js/axios.js"></script>
<script type="text/javascript" src="js/qs.js"></script>

<style type="text/css">
 .J_menuItem{
 display:none;
 }
</style>
</head>
<body class="fixed-sidebar full-height-layout gray-bg"
	style="overflow: hidden" onload="load()">
	<div id="wrapper">
		<!--左侧导航开始-->
		<nav class="navbar-default navbar-static-side" role="navigation">
			<div class="nav-close">
				<i class="fa fa-times-circle"></i>
			</div>
			<div class="sidebar-collapse">
				<ul class="nav" id="side-menu">
					<li class="nav-header">
						<div class="dropdown profile-element">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#"> <span
								class="clear"> <span class="block m-t-xs"
									style="font-size: 20px;"> <i class="fa fa-area-chart"></i>
										<strong class="font-bold">hAdmin</strong>
								</span>
							</span>
							</a>
						</div>
						<div class="logo-element">hAdmin</div>
					</li>
					<li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
						<span class="ng-scope">分类</span>
					</li>
					<li><a class="J_menuItem" style="display: block" href="/index"> <i
							class="fa fa-home"></i> <span class="nav-label">主页</span>
					</a></li>
					<li><a href="#"> <i class="fa fa fa-bar-chart-o"></i> <span
							class="nav-label">统计图表</span> <span class="fa arrow"></span>
					</a>
						<ul class="nav nav-second-level">

							<li><a class="J_menuItem" style="display: block" href="/getChartty">百度ECharts</a></li>

						</ul></li>
							<li id="huoke"><a id="ahuoke" href="#"><i
									class="fa fa-edit"></i> <span class="nav-label">获客</span><span
									class="fa arrow"></span></a>
								<ul class="nav nav-second-level">
								<li><a id="27" class="J_menuItem"  href="/dohtml5">HTML制作</a></li>
									<li ><a id="9" class="J_menuItem"  href="/getCustomergx">集客</a></li>
									<li><a  id="27" class="J_menuItem" href="/getCustomerty">获客线索</a></li>

								</ul></li>


							<li class="kehu" id="kehu"><a href="#"><i
									class="fa fa-desktop"></i> <span class="nav-label">客户</span><span
									class="fa arrow"></span></a>
								<ul class="nav nav-second-level">
									<li ><a id="10" class="J_menuItem" style="display: none" href="/getCustomerwcx">个人资料</a></li>
									<li ><a id="11" class="J_menuItem" style="display: none" href="/getLinkmanwcx">联系人</a></li>
									<li ><a id="12" class="J_menuItem" style="display: none"
										href="/getAnniversarylsl">纪念日</a></li>
									<li ><a id="13" class="J_menuItem" style="display: none" href="/getHebingwjl">客户合并</a></li>
									<li ><a id="14" class="J_menuItem" style="display: none" href="/getZhuanyiwjl">客户转移/共享</a>
									</li>
								</ul></li>


							<li class="line dk"></li>
							<li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
								<span class="ng-scope">销售</span>
							</li>

							<li id="xiaoshou"><a href="#"><i class="fa fa-flask"></i>
									<span class="nav-label">销售机会</span><span class="fa arrow"></span></a>
								<ul class="nav nav-second-level">
									<li ><a id="15" class="J_menuItem" style="display: none" href="/getJihuiwcx">销售机会</a></li>
									<li  ><a id="28" class="J_menuItem" style="display: none" href="/getLouduwcx">销售漏斗</a></li>
									<li ><a id="29" class="J_menuItem" style="display: none" href="/getXuqiuwcx">客户需求</a></li>
									<li ><a id="30" class="J_menuItem" style="display: none" href="/getFanganwcx">解决方案</a></li>
									<li ><a id="31" class="J_menuItem" style="display: none" href="/getDuiShouwcx">竞争对手</a></li>


								</ul></li>


							<li id="baojia"><a href="#"><i class="fa fa-table"></i>
									<span class="nav-label">报价</span><span class="fa arrow"></span></a>
								<ul class="nav nav-second-level">
									<li ><a id="16" class="J_menuItem" style="display: none" href="/getBaojiawcx">报价单</a></li>
									<li ><a id="32" class="J_menuItem" style="display: none" href="/getBaojiaMorewcx">报价明细</a>
									</li>
								</ul></li>


							<li id="dingdan"><a href="#"><i class="fa fa-table"></i>
									<span class="nav-label">订单</span><span class="fa arrow"></span></a>
								<ul class="nav nav-second-level">
									<li ><a id="17" class="J_menuItem" style="display: none" href="/getOrdergx">订单</a></li>
									<li ><a id="33" class="J_menuItem" style="display: none" href="/getOrderMoregx">订单明细</a></li>
									<li ><a id="34" class="J_menuItem" style="display: none" href="/getFahuogx">发货单</a></li>
									<li ><a id="35" class="J_menuItem" style="display: none" href="/getBackgx">退货</a></li>
								</ul></li>

				


						
					
							<li id="shohou"><a href="#"><i class="fa fa-table"></i>
									<span class="nav-label">售后</span><span class="fa arrow"></span></a>
								<ul class="nav nav-second-level" id="shouhouse">
							
										<li ><a id="36" class="J_menuItem" style="display: none" href="/getServiceTablety"
											>客服总控台</a></li>
										<li ><a id="18" class="J_menuItem" style="display: none" href="/getServicety">客户服务</a></li>
										<li ><a id="19" class="J_menuItem" style="display: none" href="/getTousuty">客户投诉</a></li>
										<li ><a id="20" class="J_menuItem" style="display: none" href="/getCarety">客户关怀</a></li>
								
										<li ><a id="21" class="J_menuItem" style="display: none"
											href="/getWeixiuTablety">维修总控台</a></li>
										<li ><a id="22" class="J_menuItem" style="display: none"
											href="/getWeixiuty">维修工单</a></li>
									
									<li ><a id="37" class="J_menuItem" style="display: none" href="/getQAty">QA库</a></li>
								</ul></li>
					
						
							<li class="line dk"></li>
							<li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
								<span class="ng-scope">产品</span>
							</li>


							<li ><a id="23" class="J_menuItem" style="display: none" href="/getCatlsl"><i
									class="fa fa-picture-o"></i> <span class="nav-label">分类</span></span></a></li>
							<li ><a id="24" class="J_menuItem" style="display: none" href="/getGoodlsl"><i
									class="fa fa-magic"></i> <span class="nav-label">产品</span></a></li>

							<li class="line dk"></li>

							<li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
								<span class="ng-scope">采购</span>
							</li>

							<li ><a id="38" class="J_menuItem" style="display: none" href="/purchaseList"><i
									class="fa fa-picture-o"></i> <span class="nav-label">采购</span></span></a></li>


							<li ><a id="39" class="J_menuItem" style="display: none" href="/detailList"><i
									class="fa fa-magic"></i> <span class="nav-label"> 采购明细</span></a></li>



							<li class="line dk"></li>
							<li id="kucun"><a href="#"><i class="fa fa-table"></i> <span
									class="nav-label">库存</span><span class="fa arrow"></span></a>
								<ul class="nav nav-second-level">
									<li ><a id="25" class="J_menuItem" style="display: none" href="/deportitem"><i
											class="fa fa-magic"></i> <span class="nav-label">库存</span></a></li>
									<li ><a id="26" class="J_menuItem" style="display: none" style="display: none" href="/inoutlife"><i
											class="fa fa-picture-o"></i> <span class="nav-label">出入库流水</span></a></li>
									<li><a  id="40" class="J_menuItem" style="display: none" href="/instockes"><i
											class="fa fa-magic"></i> <span class="nav-label">入库单</span></a></li>
									<li ><a id="41" class="J_menuItem" style="display: none" href="/treasury"><i
											class="fa fa-magic"></i> <span class="nav-label">出库单</span></a></li>

								</ul></li>
						
							<li class="line dk"></li>
							<li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
								<span class="ng-scope">员工</span>
							</li>
							<li ><a id="42" class="J_menuItem" style="display: none" href="/dept"><i
									class="fa fa-picture-o"></i> <span class="nav-label">部门和用户设置</span></span></a></li>
							<li ><a id="43" class="J_menuItem" style="display: none" href="/userpermission" id="rolese"><i
									class="fa fa-magic"></i> <span class="nav-label">角色和权限设置</span></a></li>
				</ul>
			</div>
		</nav>
		<!--左侧导航结束-->
		<!--右侧部分开始-->
		<div id="page-wrapper" class="gray-bg dashbard-1">
			<div class="row border-bottom">
				<nav class="navbar navbar-static-top" role="navigation"
					style="margin-bottom: 0">
					<div class="navbar-header">
						<a class="navbar-minimalize minimalize-styl-2 btn btn-info "
							href="#"><i class="fa fa-bars"></i> </a>
						<el-form :model="anniForm" ref="anniForm" role="search"
							class="navbar-form-custom" method="post"
							action="search_results.html">
						<div class="form-group" style="margin-top:7px;">
						<el-row>
						<el-col :span="24">
							<el-autocomplete class="inline-input" v-model="anniForm.urladss"
								:fetch-suggestions="querySearch" placeholder="请输入您需要查找的内容 …"
								:trigger-on-focus="false" @select="handleSelect"></el-autocomplete>
</el-col>
</el-row>
						</div>
						</el-form>
					</div>

					<ul class="nav navbar-top-links navbar-right">
						<li class="dropdown">
						
						 <a class="dropdown-toggle count-info"
							data-toggle="dropdown" href="#"> <img style="width: 30px; height: 30px" alt="image"
											class="img-circle" :src="imageUrl">
											<span style="color: fff">{{login_name}}</span>
						</a>
						
						
							<ul class="dropdown-menu dropdown-messages">
								<li class="m-t-xs">
									<div class="dropdown-messages-box">
										<a href="profile.html" class="pull-left"> <img alt="image"
											class="img-circle" :src="imageUrl">
										</a>
										<div class="media-body">
										<span>姓名：{{use_name}}</span>
										<span style="margin-left: 15px;">角色：{{role}}</span>
										<hr>
										</div>
									</div>
								</li>
								<li>
									<div class="dropdown-messages-box">
										<div class="media-body ">
										<span style="margin-left:20px;">部门：{{dep_name}}</span>
											<span style="margin-left: 20px;">联系方式：{{us_phone}}</span>
										</div>
									</div>
								</li>
								<li class="divider"></li>
								<li>
									<div class="text-center link-block">
									
									<span class="J_menuItem" style="display: block; height: 20px; color:red"> <span class="nav-label">
										   <el-button type="text"  @click="centerDialogVisible3=true">
										  
										     <span style="color:red; margin:5px 20px">
										      <i class="fa fa-magic" style="color:red"></i>
										       退出登录</span>
                                       </el-button></span></span>
                                       
                                       <el-dialog
														:visible.sync="centerDialogVisible3" width="30%" center>
													<span>确定要删除吗？ </span> <span slot="footer"
														class="dialog-footer"> <el-button
															@click="centerDialogVisible3 = false">取消</el-button> <el-button
															type="primary" @click="signoutuser()">确定</el-button>
													</span> </el-dialog>
                                       
									</div>
								</li>
							</ul></li>
							
							
							
							
							
						<li class="dropdown"><a class="dropdown-toggle count-info"
							data-toggle="dropdown" href="#"> <i class="fa fa-bell"></i> <span
								class="label label-primary">${careCount}</span>
						</a>
							<ul class="dropdown-menu dropdown-alerts">
								<li><a class="J_menuItem" href="/careDay">
										<div>
											<i class="fa fa-envelope fa-fw"></i> 您有${careCount}条未读消息 <span
												class="pull-right text-muted small">4分钟前</span>
										</div>
								</a></li>
								<li class="divider"></li>
								<!-- <li><a class="J_menuItem" href="profile.html">
										<div>
											<i class="fa fa-qq fa-fw"></i> 3条新回复 <span
												class="pull-right text-muted small">12分钟钱</span>
										</div>
								</a></li>
								<li class="divider"></li> -->
								<li>
									<div class="text-center link-block">
										<a class="J_menuItem" style="display: none" href="notifications.html"> <strong>查看所有
										</strong> <i class="fa fa-angle-right"></i>
										</a>
									</div>
								</li>
							</ul></li>
					</ul>
				</nav>
			</div>

			<div class="row J_mainContent" id="content-main">
				<iframe id="J_iframe" width="100%" height="100%" :src="fimsrc"
					frameborder="0" data-id="index_v1.html" seamless></iframe>
			</div>
		</div>

	
		<!--右侧部分结束-->
	</div>
	<script type="text/javascript">
	 function load(){
		 var xm='<%=session.getAttribute("userPersstion")%>';	
		// alert(xm);
		    var obj1 = eval(xm);                
		 for(var x=0;x<=obj1.length-1;x++){
			 for (var i = 0; i < obj1[x].length; i++) {
				// alert(obj1[x][i].xm);
				 $("#"+obj1[x][i].xm).css("display","block");
			}
		 }
	 }
	</script>
	<script type="text/javascript">
					  var vm=new Vue({
						  el:"#wrapper",
						  data(){
							  return{
								  restaurants:[],
								  fimsrc:"/index",
								  imageUrl:"",
								  use_name:"",
								  dep_name:"",
								  us_phone:"",
								  use_age:"",
								  role:"",
								  serfrom:"",
								  centerDialogVisible3:false,
								  anniForm: {
									  urladss:""
										}
							  }
						  },methods:{
							  querySearch: function(queryString, cb) {									
									var result = []; 
									//遍历所有的选项
								 	vm.restaurants.forEach(v => {
										//如果文本框中的值和选项相符,则返回该选项
										if(v.value.indexOf(queryString)>= 0) {
											result.push(v);
										}
										}) 
										cb(result);
							  },
							  handleSelect:function(it){		
								  this.fimsrc=it.urladss;
							  },
							  signoutuser:function(){
								//  this.serfrom="/signoutuser";
								//  axios.get("/signoutuser");	
								  axios.get("/signoutuser",
											//参数转换
											Qs.stringify(this.anniForm, {
												arrayFormat: 'brackets'
											})		
										).then(function(v) {
											 window.parent.location.replace("/signoutuser");
										}).catch(function(e) {
											alert("出错了"+e);
										});
							  }
							 
						  },mounted(){
							  axios.post("/getfindmenu",
										//参数转换
										Qs.stringify(this.anniForm, {
											arrayFormat: 'brackets'
										})		
									).then(function(v) {
										vm.restaurants=v.data;
										
									}).catch(function(e) {
										alert("出错了"+e);
									});
							  axios.post("/selectuserdepos",
										//参数转换
										Qs.stringify(this.anniForm, {
											arrayFormat: 'brackets'
										})		
									).then(function(v) {
										//alert(v.data.use_img);
										vm.imageUrl=".."+v.data.user.use_img;
										vm.use_name=v.data.user.use_name;
										vm.use_age=v.data.user.use_age;
										vm.us_phone=v.data.user.us_phone;
										vm.dep_name=v.data.user.dep_name;
										vm.login_name=v.data.user.login_name;
										vm.role=v.data.role;
									}).catch(function(e) {
										alert("出错了"+e);
									});
						  }
						  
					  });
					</script>


	<!-- 全局js -->
	<script src="js/jquery.min.js?v=2.1.4"></script>
	<script src="js/bootstrap.min.js?v=3.3.6"></script>
	<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script src="js/plugins/layer/layer.min.js"></script>

	<!-- 自定义js -->
	<script src="js/hAdmin.js?v=4.1.0"></script>
	<script type="text/javascript" src="js/index.js"></script>

	<!-- 第三方插件 -->
	<script src="js/plugins/pace/pace.min.js"></script>

</body>

</html>
